Don't build the gui on [!amd64 arm64 armhf i386 mipsel]
authorBernd Zeimetz <bernd@bzed.de>
Sat, 21 Oct 2017 10:17:26 +0000 (12:17 +0200)
committerBernd Zeimetz <bernd@bzed.de>
Sat, 21 Oct 2017 11:08:16 +0000 (13:08 +0200)
The recent qtwebengine is not available on all architectures.

Closes: #877808
Thanks: Adrian Bunk

debian/control
debian/rules

index 12f6724dedd0397a17b2b59b1c42a59348b38d0c..e5995e81b2df9d25900808f0f7de021427dac0e2 100644 (file)
@@ -7,7 +7,9 @@ Build-Depends: debhelper (>= 10~), quilt,
  libexpat1-dev, expat, help2man,
  libxml2-utils,
  libusb-dev, zlib1g-dev,
- qtbase5-dev, qtwebengine5-dev, qttools5-dev-tools,
+ qtbase5-dev,
+ qtwebengine5-dev [amd64 arm64 armhf i386 mipsel],
+ qttools5-dev-tools,
  imagemagick,
  locales-all
 Build-Depends-Indep: fop [!mips], xsltproc, docbook-xml,
@@ -67,7 +69,7 @@ Description: GPS file conversion plus transfer to/from GPS units
  This package contains the detailed documentation of gpsbabel.
 
 Package: gpsbabel-gui
-Architecture: any
+Architecture: amd64 arm64 armhf i386 mipsel
 Depends: ${shlibs:Depends}, ${misc:Depends}, gpsbabel (= ${binary:Version})
 Description: GPS file conversion plus transfer to/from GPS units - GUI
  GPSBabel converts waypoints, tracks, and routes from one format to
index 1cfa6149839171af43911944dc6a519202f6bd06..5a3d77f16cf104368cea278cc8210c8c299ff838 100755 (executable)
@@ -60,7 +60,11 @@ debian/gpsbabel.1: build-stamp
                        ./gpsbabel
 
 gui/Makefile: $(QUILT_STAMPFN)
-       cd gui && qmake
+       set -e; cd gui; if dpkg -s qtwebengine5-dev; then \
+           qmake; \
+       else \
+           echo -e '#!/usr/bin/make -f\n\n%:\n\techo $$@' > Makefile ; \
+       fi
 
 debian/gpsbabel.xpm: gui/images/appicon.png
        convert -resize 32x32 $< $@
@@ -99,7 +103,7 @@ endif
 
 build-gui: build-gui-stamp
 build-gui-stamp: gui/Makefile
-       $(MAKE) gui
+       if dpkg -s qtwebengine5-dev; then $(MAKE) gui; fi
        touch $@
 
 clean: clean-patched unpatch